﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Frame.Lib.Data;



namespace Forum.Entity.Member
{
    public partial class ForumMemberInfo : EntityBase
    {
        public override string GetTableName()
        {
            return "ForumMember";
        }
        public override string GetInsertSql()
        {
            return "insert into ForumMember ( [ID], [GroupID], [GroupName], [RegisterTime], [LastVisitTime], [LastPostTime], [PostCount], [EssencePostCount], [Score], [Birthday], [Signs], [HeadImage], [IDCard], [Gender], [Telephone], [QQ], [MSN]) values ( @ID, @GroupID, @GroupName, @RegisterTime, @LastVisitTime, @LastPostTime, @PostCount, @EssencePostCount, @Score, @Birthday, @Signs, @HeadImage, @IDCard, @Gender, @Telephone, @QQ, @MSN)";
        }
        public override string GetUpdateSql()
        {
            return "update ForumMember set  [ID] = @ID, [GroupID] = @GroupID, [GroupName] = @GroupName, [RegisterTime] = @RegisterTime, [LastVisitTime] = @LastVisitTime, [LastPostTime] = @LastPostTime, [PostCount] = @PostCount, [EssencePostCount] = @EssencePostCount, [Score] = @Score, [Birthday] = @Birthday, [Signs] = @Signs, [HeadImage] = @HeadImage, [IDCard] = @IDCard, [Gender] = @Gender, [Telephone] = @Telephone, [QQ] = @QQ, [MSN] = @MSN where ID = @ID";
        }
        /// <summary>
        /// 
        /// </summary>
        public Int32 ID
        {
            get;
            set;
        }
        /// <summary>
        /// 组ID
        /// </summary>
        public Int32 GroupID
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        public String GroupName
        {
            get;
            set;
        }
        /// <summary>
        /// 注册时间
        /// </summary>
        public DateTime RegisterTime
        {
            get;
            set;
        }
        /// <summary>
        /// 最后访问时间
        /// </summary>
        public DateTime LastVisitTime
        {
            get;
            set;
        }
        /// <summary>
        /// 最后发帖时间
        /// </summary>
        public DateTime LastPostTime
        {
            get;
            set;
        }
        /// <summary>
        /// 总发帖数
        /// </summary>
        public Int32 PostCount
        {
            get;
            set;
        }
        /// <summary>
        /// 精华贴数
        /// </summary>
        public Int32 EssencePostCount
        {
            get;
            set;
        }
        /// <summary>
        /// 积分
        /// </summary>
        public Int32 Score
        {
            get;
            set;
        }
        /// <summary>
        /// 生日
        /// </summary>
        public DateTime? Birthday
        {
            get;
            set;
        }
        /// <summary>
        /// 签名
        /// </summary>
        public String Signs
        {
            get;
            set;
        }
        /// <summary>
        /// 头像
        /// </summary>
        public String HeadImage
        {
            get;
            set;
        }
        /// <summary>
        /// 身份证号
        /// </summary>
        public String IDCard
        {
            get;
            set;
        }
        /// <summary>
        /// 性别
        /// </summary>
        public Boolean Gender
        {
            get;
            set;
        }
        /// <summary>
        /// 固定电话
        /// </summary>
        public String Telephone
        {
            get;
            set;
        }
        /// <summary>
        /// QQ
        /// </summary>
        public String QQ
        {
            get;
            set;
        }
        /// <summary>
        /// MSN
        /// </summary>
        public String MSN
        {
            get;
            set;
        }
        public override void SetValue(string key, object value)
        {
            key = key.ToLower();
            switch (key)
            {
                case "id":
                    this.ID = (Int32)value;
                    break;
                case "groupid":
                    this.GroupID = (Int32)value;
                    break;
                case "groupname":
                    this.GroupName = (String)value;
                    break;
                case "registertime":
                    this.RegisterTime = (DateTime)value;
                    break;
                case "lastvisittime":
                    this.LastVisitTime = (DateTime)value;
                    break;
                case "lastposttime":
                    this.LastPostTime = (DateTime)value;
                    break;
                case "postcount":
                    this.PostCount = (Int32)value;
                    break;
                case "essencepostcount":
                    this.EssencePostCount = (Int32)value;
                    break;
                case "score":
                    this.Score = (Int32)value;
                    break;
                case "birthday":
                    this.Birthday = (DateTime?)value;
                    break;
                case "signs":
                    this.Signs = (String)value;
                    break;
                case "headimage":
                    this.HeadImage = (String)value;
                    break;
                case "idcard":
                    this.IDCard = (String)value;
                    break;
                case "gender":
                    this.Gender = (Boolean)value;
                    break;
                case "telephone":
                    this.Telephone = (String)value;
                    break;
                case "qq":
                    this.QQ = (String)value;
                    break;
                case "msn":
                    this.MSN = (String)value;
                    break;
            }
        }
        public override object GetValue(string key)
        {
            key = key.ToLower();
            switch (key)
            {
                case "id":
                    return this.ID;
                case "groupid":
                    return this.GroupID;
                case "groupname":
                    return this.GroupName;
                case "registertime":
                    return this.RegisterTime;
                case "lastvisittime":
                    return this.LastVisitTime;
                case "lastposttime":
                    return this.LastPostTime;
                case "postcount":
                    return this.PostCount;
                case "essencepostcount":
                    return this.EssencePostCount;
                case "score":
                    return this.Score;
                case "birthday":
                    return this.Birthday;
                case "signs":
                    return this.Signs;
                case "headimage":
                    return this.HeadImage;
                case "idcard":
                    return this.IDCard;
                case "gender":
                    return this.Gender;
                case "telephone":
                    return this.Telephone;
                case "qq":
                    return this.QQ;
                case "msn":
                    return this.MSN;
                default:
                    return null;
            }
        }
    }


}
